//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_randomarray.sqf"
#include "x_setup.sqf"

// shuffles the content of an array
// parameters: array
// example: _myrandomarray = _myNormalArray call FUNC(RandomArray);
private ["_ar","_ran_array","_this"];
_ar =+ _this;
_ran_array = [];
while {count _ar > 0} do {_ran = (count _ar) call FUNC(RandomFloor);
	_ran_array set [count _ran_array, _ar select _ran];
	_ar set [_ran, "-1"];
	_ar = _ar - ["-1"];
};
_ran_array
